package com.qf.service.impl;

import com.github.pagehelper.PageHelper;
import com.qf.mapper.ApplicationMapper;
import com.qf.pojo.Application;
import com.qf.service.ApplicationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 作者：冯国清
 * 项目名：com.qf.service.impl
 * 时间：2020/7/29 21:46
 * 描述:
 */
@Service
public class ApplicationServiceImpl implements ApplicationService {
    @Resource
    private ApplicationMapper applicationMapper;
    @Override
    public List<Application> getAllApplication(int page,int limit) {
        PageHelper.startPage(page,limit);
        return applicationMapper.getAllApplication();
    }

    @Override
    public int getCount() {
        return applicationMapper.getCount();
    }

    @Override
    public int saveApplication(Application application) {
        return applicationMapper.saveApplication(application);
    }

    @Override
    public Application selectApplicationById(int aid) {
        return applicationMapper.selectApplicationById(aid);
    }

    @Override
    public int updateApplication(Application application) {
        return applicationMapper.updateApplication(application);
    }

    @Override
    public int deleteApplication(int aid) {
        return applicationMapper.deleteApplication(aid);
    }

    @Override
    public int deleteByIds(int[] aids) {
        return applicationMapper.deleteByIds(aids);
    }
}
